package com.wxq.blog.controller;

import com.wxq.blog.common.aop.LogAnnotation;
import com.wxq.blog.service.LoginService;
import com.wxq.blog.vo.Result;
import com.wxq.blog.vo.params.LoginParams;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login")
public class LoginController {
    @Autowired
    public LoginService loginService;
    @PostMapping
    @LogAnnotation(module = "登录",operation = "login登录")//加入aop切面输出日志
    public Result login(@RequestBody LoginParams loginParams){
        return loginService.login(loginParams);
    }
}
